package com.zoe.vhr.util;

import org.springframework.security.core.context.SecurityContextHolder;

/**
 * @Author Zoe.Zhang
 * @Date: 2021/07/29
 * @Description Security工具栏
 */
public class SecurityUtil<E> {

    public static <T> T getCurrentUser() {
        T principal = (T) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
        return principal;
    }
}
